<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function displayInfo(args) {
            let output = "";
            if (typeof args.name == "string") {
                output += "Name: " + args.name + "\n";
            }
            if (typeof args.age == "number") {
                output += "Age: " + args.age + "\n";
            }
            alert(output);
        }
        displayInfo({
            name:"Duye",
            age:20
        })
        displayInfo({
            name:"test"
        });
    </script>
</head>

<body>

</body>

</html>